﻿////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// <copyright>Copyright 2008-2011 Andreas Huber Doenni</copyright>
// Distributed under the Microsoft Public License (Ms-PL).
// See accompanying file License.txt or copy at http://mews.codeplex.com/license.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

namespace Mews.Application
{
    using System.IO;
    using System.Windows.Forms;

    /// <summary>Displays the manual.</summary>
    internal sealed partial class ManualForm : DoneCancelForm
    {
        internal ManualForm(Form owner, string fileName) : base(owner, null, false, false, true)
        {
            this.InitializeComponent();

            using (var resourceReader = new StreamReader(
                typeof(ManualForm).Assembly.GetManifestResourceStream(typeof(ManualForm).Namespace + '.' + fileName)))
            {
                this.webBrowser.DocumentText = resourceReader.ReadToEnd();
            }
        }
    }
}
